import { Space, Table, Button } from 'antd';
import React from 'react';



const App = (props) => {
  let data = [
    {
      key: '1',
      school: '南昌大学',
      subject: props.name,
      level_4: 'A',
      icon: '/images/01.png'
    },
    {
      key: '2',
      school: '江西财经大学',
      subject: props.name,
      level_4: 'A-',
      icon: '/images/02.png'
    },
    {
      key: '3',
      school: '江西师范大学',
      subject: props.name,
      level_4: 'A-',
      icon: '/images/03.png'
    },
    {
      key: '4',
      school: '江西财经大学',
      subject: props.name,
      level_4: 'A-',
      icon: '/images/04.png'
    },
    {
      key: '5',
      school: '景德镇陶瓷大学',
      subject: props.name,
      level_4: 'B+',
      icon: '/images/05.png'
    }
  ];

  const columns = [
    {
      title: '院校名称',
      dataIndex: 'school',
      key: 'school',
      render: (text,_,idx) => <b><img
        src={data[idx].icon}
        style={{width: 30, height: 30, marginRight: 6}}/> {text}</b>,
    },
    {
      title: '学科',
      dataIndex: 'subject',
      key: 'subject',
      render: (text) => <b style={{color: 'orange'}}>{text}</b>,
    },
    {
      title: '第四轮评估结果',
      dataIndex: 'level_4',
      key: 'level_4',
      render: text => <b style={{color: 'red', fontSize: 26}}>{text}</b>,
    },
  ];
  return <Table<any>
    rowKey={(record) => record.key}
    size="large"
    columns={columns}
    dataSource={data}
    className="TableParallel"
    pagination={{
      // style: { marginBottom: 0 },
      pageSize: 5,
      hideOnSinglePage: true,
      showSizeChanger: false,
      showQuickJumper: false
    }}
  />
}

export default App;
